package org.darcy.entity.org;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(description="OrgDepartment: 部门")
@TableName(value = "org_department")
public class Department implements Serializable {

	private static final long serialVersionUID = 1;

	@Schema(description = "")
	@TableId(type = IdType.AUTO)
	private Integer id;

	@Schema(description = "父id")
	@TableField(value = "`pid`")
	private Integer pid;

	@Schema(description = "公司id")
	@TableField(value = "`company_id`")
	private Integer companyId;

	@Schema(description = "名称")
	@TableField(value = "`name`")
	private String name;

	@Schema(description = "编号")
	@TableField(value = "`code`")
	private String code;

	@Schema(description = "备注")
	@TableField(value = "`note`")
	private String note;

	@Schema(description = "部门领导工号")
	@TableField(value = "`leader_code`")
	private Integer leaderCode;

	@Schema(description = "分管领导工号")
	@TableField(value = "`superior_code`")
	private String superiorCode;

	@Schema(description = "排序号")
	@TableField(value = "`order_no`")
	private Integer orderNo;

	@Schema(description = "创建时间")
	@TableField(value = "`create_time`")
	private Date createTime;

	@Schema(description = "更新时间")
	@TableField(value = "`update_time`")
	private Date updateTime;

	@Schema(description = "删除标识0表示删除1表示存在")
	@TableField(value = "`del_flag`")
	private Integer delFlag;

	///

	// 部门领导
	@TableField(exist = false)
	private String leaderName;

	// 父亲code
	@TableField(exist = false)
	private String pcode;

	// 公司的code
	@TableField(exist = false)
	private String companyCode;

	/**
	 * 分管领导姓名
	 */
	@TableField(exist = false)
	private String superiorName;
	/**
	 * 查询条件 - 【临时属性】
	 */
	@TableField(exist = false)
	private List<Integer> companyIds;

	@TableField(exist = false)
	private String companyName;

}
